// 导入reducer函数
import { numReducer } from "./reducer.js";
import { createStore } from 'redux'

/**
 * 创建store：建立action和reducer的联系
 */

// 创建store
const store = createStore(numReducer)
// console.log(store)

// 订阅store变化 test
store.subscribe(() => {
  console.log('store数据变化了：', store.getState())
})

export default store
